package com.sansan.qiangji.service.impl.base;

import com.sansan.qiangji.VO.base.stock.StockVO;
import com.sansan.qiangji.entity.base.Stock;
import com.sansan.qiangji.entity.base.example.StockExample;
import com.sansan.qiangji.form.base.StockListForm;
import com.sansan.qiangji.mapper.base.StockMapper;
import com.sansan.qiangji.service.inter.base.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StockServiceImpl implements StockService {

    @Autowired
    private StockMapper stockMapper;

    @Override
    public List<Stock> findByBoxCode(String boxCode) {
        return stockMapper.findByBoxCode(boxCode);
    }

    @Override
    public List<Stock> findByShelveNameAndWidthAndHeight(String shelveName, Integer stockWidth, Integer stockHeight) {
        return stockMapper.findByShelveNameAndWidthAndHeight(shelveName, stockWidth, stockHeight);
    }

    @Override
    public long countByExample(StockExample example) {
        return stockMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(StockExample example) {
        return stockMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer stockId) {
        return stockMapper.deleteByPrimaryKey(stockId);
    }

    @Override
    public int insert(Stock record) {
        return stockMapper.insert(record);
    }

    @Override
    public int insertSelective(Stock record) {
        return stockMapper.insertSelective(record);
    }

    @Override
    public List<Stock> selectByExample(StockExample example) {
        return stockMapper.selectByExample(example);
    }

    @Override
    public Stock selectByPrimaryKey(Integer stockId) {
        return stockMapper.selectByPrimaryKey(stockId);
    }

    @Override
    public int updateByExampleSelective(Stock record, StockExample example) {
        return stockMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Stock record, StockExample example) {
        return stockMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(Stock record) {
        return stockMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Stock record) {
        return stockMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<StockVO> groupCountByExample(StockExample example) {

        return stockMapper.groupCountByExample(example);
    }

    @Override
    public List<StockVO> groupCountByCondition(StockListForm form) {
        return stockMapper.groupCountByCondition(form);
    }
}
